# coding=utf-8
"""

"""
import uuid

from flask import jsonify


# @Time    :  2024-10-30 11:59:45
# @Author  :  jiangtong
# @Email   :  gingerqgyy@outlook.com
# @Project :  flask_ocr
# @File    :  base_res

def base_res(result=None, code='OK', message='OK', error_code=None, trace_id=None):
    return jsonify({
        'application': 'flask-ocr',
        'code': code,
        'errorCode': error_code,
        'message': message,
        'result': result,
        'traceId': trace_id if trace_id else str(uuid.uuid4()),
    })
